<template>
  <div>
    <el-card shadow="hover" :body-style="{padding: '0px'}">
      <div class="card-box clearfix">
        <i class="box-title-icon" :class="content.icon"></i>
        <template>
          <el-tabs v-model="activeNameTodo" @tab-click="handleTodoClick">
            <el-tab-pane :label="content.name" name="first">
              <div class="tabs-content-box">
                <el-table :data="todoList" :show-header="false" style="width: 100%;font-size:14px;">
                  <el-table-column width="40">
                    <template slot-scope="scope">
                      <div class="todo-tag" v-bind:class="'todo-tag-'+scope.row.id">{{scope.row.tag}}</div>
                    </template>
                  </el-table-column>
                  <el-table-column>
                    <template slot-scope="scope">
                      <div class="todo-item">{{scope.row.title}}</div>
                    </template>
                  </el-table-column>
                  <el-table-column width="80">
                    <template slot-scope="scope">
                      <div class="todo-name">{{scope.row.name}}</div>
                    </template>
                  </el-table-column>
                  <el-table-column width="105">
                    <template slot-scope="scope">
                      <div class="todo-date">{{scope.row.date}}</div>
                    </template>
                  </el-table-column>
                </el-table>
              </div>
            </el-tab-pane>
            <!--<el-tab-pane label="跟踪事项" name="second">
              <div class="tabs-content-box">
                <el-table :data="todoList" :show-header="false" style="width: 100%;font-size:14px;">
                  <el-table-column width="40">
                    <template slot-scope="scope">
                      <div class="todo-tag" v-bind:class="'todo-tag-'+scope.row.id">{{scope.row.tag}}</div>
                    </template>
                  </el-table-column>
                  <el-table-column>
                    <template slot-scope="scope">
                      <div class="todo-item">{{scope.row.title}}</div>
                    </template>
                  </el-table-column>
                  <el-table-column width="80">
                    <template slot-scope="scope">
                      <div class="todo-name">{{scope.row.name}}</div>
                    </template>
                  </el-table-column>
                  <el-table-column width="105">
                    <template slot-scope="scope">
                      <div class="todo-date">{{scope.row.date}}</div>
                    </template>
                  </el-table-column>
                </el-table>
              </div>
            </el-tab-pane>-->
          </el-tabs>
        </template>
        <el-button class="btn-more" type="text"><a title="" :href="content.url" target="_blank">更多</a></el-button>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
    name: 'work-default',
    props: ['content'],
    data() {
        return {
            activeNameTodo: 'first',
            url: '',
            todoList: [{
                tag: '1',
                id: 1,
                title: '今天要修复100个bug',
                name:'张三',
                date:'2019-05-08'
            },
            {
                tag: '2',
                id: 2,
                title: '今天要修复100个bug',
                name:'张三',
                date:'2019-05-08'
            },
            {
                tag: '3',
                id: 3,
                title: '今天要修复100个bug',
                name:'张三',
                date:'2019-05-08'
            },
            {
                tag: '4',
                id: 4,
                title: '今天要修复100个bug',
                name:'张三',
                date:'2019-05-08'
            },
            {
                tag: '5',
                id: 5,
                title: '今天要修复100个bug',
                name:'张三',
                date:'2019-05-08'
            },
            {
                tag: '6',
                id: 6,
                title: '今天要修复100个bug',
                name:'张三',
                date:'2019-05-08'
            }]
        };
    },
    methods: {
        // handleTodoClick(tab, event) {
        //     console.log(tab, event);
        // },
        handleMoreClick(){
        //根据所在的标签的不同，more的链接不同
        /*if (tab.name == "first") {
            url:'www.qq.com'
        } else {
            url:'www.baidu.com'
        }*/
        },

    }
};
</script>
